// component/thumbnail/thumbnail.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    navigate: {
      type: String,
      value: "/pages/details/details"
    },
    thumbnail_obj: {
      type: Object
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    onclick: function() {
      //console.log(this.properties.thumbnail_obj.rating.value)
      console.log(this.properties.thumbnail_obj);
      var id = this.properties.thumbnail_obj.id;
      var type = this.properties.thumbnail_obj.type;
      if (this.properties.thumbnail_obj.rating == null) {
        var value = 0;
      } else {
        var value = this.properties.thumbnail_obj.rating.value;
      }

      wx.navigateTo({
        url: "/pages/details/details" + "?id=" + id + "&type=" + type + "&value=" + value
      })
    }
  }
})